#ifndef SQLEDITOR_H
#define SQLEDITOR_H

#include <QWidget>
#include "mysqldb.h"

namespace Ui {
class SqlEditor;
}

class SqlEditor : public QWidget
{
    Q_OBJECT

public:
    explicit SqlEditor(QWidget *parent = 0);
    ~SqlEditor();

    void setDatabaseInfo(const DatabaseInfo &dbInfo);
    void setSqlText(const QString &sql);
    QString sqlText();

public slots:
    void runSql();

private:
    Ui::SqlEditor *ui;

    QString m_sql;
    DatabaseInfo m_dbInfo;
};

#endif // SQLEDITOR_H
